package com.iss.okair.controller.baseinfo;

import com.iss.okair.db.entity.Employee;
import com.iss.okair.db.entity.EmployeeDept;
import com.iss.okair.service.baseinfo.EmployeeService;
import com.iss.okair.service.baseinfo.SysuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
//导入头部地址
@RequestMapping("/logic/baseInfo/employee")
public class EmployeeController {
    //自动实例化
    @Autowired
    private EmployeeService service;
    //导入地址
    @RequestMapping("/deptList")
    //返回一个全部员工部门权限的集合
  public List<EmployeeDept> deptlist(){
      return service.getemplist();
  }
  @RequestMapping("/find")
  public List<Employee> find(Employee emp){
        return service.findBy(emp);
  }
  @RequestMapping("/list")
  public List<Employee> selectList(String dept){
        return  service.selectList(dept);
  }
}
